<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>项目中引入模块</title>
</head>
<body>
<!--
 1. 安装工具: npm i babel-cli babel-preset-env browserify -D  --- (webpack)
 2. npx babel model -d dist --presets=babel-preset-env
 3. 打包 npx browserify dist/case.js -o dist/bundle.js
 -->
<script src="dist/bundle.js">
    // 导入大小写模块
    import {lower, upper} from "./dist/bundle.js";
    import * as string from "./dist/bundle.js";

    //导入的是 默认暴漏


    console.log(string.string)

    const str='zHangSan'
    let result1=upper(str)//转换为大写
    let result2=lower(str)//转换为小写
    console.log(result1,result2)
</script>
</body>
</html>